package br.edu.unilasalle.simon_api.rs;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.springframework.beans.factory.annotation.Autowired;

import br.edu.unilasalle.simon_api.domain.EnderecoEntidade;
import br.edu.unilasalle.simon_api.service.IEnderecoEntidadeService;

@Path("/endereco")
public class EnderecoRS {
	
	@Autowired
	private IEnderecoEntidadeService service;
	
	@GET
    @Path("{cep}")
    @Produces(MediaType.APPLICATION_JSON)
    public EnderecoEntidade findEnderecoByCep(@PathParam("cep") String cep) {
        return service.findEnderecoByCep(cep);
    }

}
